home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / MacHaskell 2.2 / progs / demo / X11 / animation / birds.hs < prev    next >
Encoding:
Text File  |  1994-09-27  |  879 b   |  29 lines  |  [TEXT/YHS2]

  1. module Birds where
  2.  
  3. import Animation
  4.  
  5. bird :: Movie
  6. --bird = osc [bird1,bird2]
  7. bird = rOVERLAY
  8.          [apply (bPar [right,right,right,right]) bm1,
  9.           apply (bPar [up,right,right,right]) bm2]
  10.          where bm1 = osc [bird1]
  11.                bm2 = osc [bird2]
  12.  
  13. bird1 = [(black,b1)]
  14.         where b1 = [(0,90),(20,100),(30,110),(40,110),(50,100),(110,120),
  15.                     (130,100),(120,90),(80,90),(0,90),
  16.                     (80,90),(90,70),(140,50),(120,90),(80,90),
  17.                     (80,90),(70,70),(80,60),(90,70)]
  18.  
  19. bird2 = [(red,b2)]
  20.         where b2 = [(0,60),(20,70),(30,80),(40,80),(50,70),(110,70),
  21.                     (140,30),(110,35),(100,35),(70,50),(50,60),(0,60),
  22.                 (70,50),(100,90),(150,100),(120,60),(110,35),
  23.                     (70,50),(65,100),(85,115),(97,86)]
  24.  
  25. main = getEnv "DISPLAY" >>=
  26.        (\ host -> displaym host 30 bird)
  27.  
  28.  
  29.